package org.example.zuoye.service;

import com.github.pagehelper.PageInfo;
import org.example.zuoye.entity.Appoint;
import org.example.zuoye.vo.AppointInfo;

import java.util.List;


/**
 * @Author xinchen
 * @Date: 2024/08/15/ 11:48
 * @Description
 */

public interface AppointService {
    // 分页查询
    PageInfo search(Integer page, Integer limit, Appoint appoint);
    // 批量删除
    int remove(Integer[] ids) throws Exception;
    // 添加
    int add(Appoint appoint) throws Exception;
    // 修改
    int update(Appoint appoint) throws Exception;
    // 叫号
    int edit(Appoint appoint);
    // 取消叫号
     boolean editById(Integer[] ids) throws Exception;
     // 根据sid查询
    List<Appoint> getBySid(Integer sid);
    // 修改状态
    boolean updateById(Integer id) throws Exception;
    // 根据id删除
    int removeById(Integer id);
    // 修改状态:完成
    int updateByStatue(Appoint appoint)throws Exception;
    // 修改病例
    int updateByRemark(Appoint appoint) throws Exception;

    // 添加预约表中插入数据
    int save(Appoint appoint) throws Exception;

    /**
     * 根据病人id，查询所有的预约id
     * @param patId
     * @return
     */
    List<AppointInfo> getByPatId(Integer patId,String date) throws Exception;

    /**
     * 根据预约id，修改预约状态
     * @throws Exception
     */
    boolean updateByAppId(Integer appId) throws Exception;
}
